package com.sduept.i1.model;

import java.net.DatagramSocket;
import java.util.LinkedList;
import java.util.Queue;
import java.util.concurrent.BlockingQueue;
import java.util.concurrent.LinkedBlockingDeque;

import org.tio.core.Node;
import org.tio.core.intf.Packet;

public class MonitorPacket extends Packet {
	private static final long serialVersionUID = 1L;
	public static final short FRAME_HEADER = 0x5AA5;
    public static final short FRAME_END = 0x96;
    public static final short MAX_MSG_LEN = 1417;  //最长1417个字节

    public Apdu inApdu; // 正常接收的数据缓冲区
    public Queue<Apdu> outApduQueue; // 发送数据队列
    public String identification;
    public BlockingQueue<Apdu> firmBlockingQueue = new LinkedBlockingDeque<>(); // 固件升级回应帧
    public BlockingQueue<Apdu> devConfBlockingQueue = new LinkedBlockingDeque<>(); // 下发参数回应帧
    public BlockingQueue<Apdu> remoteCtlBlockingQueue = new LinkedBlockingDeque<>(); // 原方操作回应帧
    public Node lastNode; // 仅用于UDP
    public DatagramSocket datagramSocket; // 仅用于UDP 

    public RemoteFile remoteFile;

    public MonitorPacket() {
        inApdu = new Apdu();
        outApduQueue = new LinkedList<>();
        remoteFile = new RemoteFile();
    }
    
    public String toString() {
    	return inApdu.toString();
    }
}
